package com.zbkj.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.GsonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Accessors(chain = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "用户表")
@TableName(value = "eb_user")
@Table(value = "eb_user")
public class EbUserEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    @Id(keyType = KeyType.Auto)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户账号
     */
    @Schema(description = "用户账号")
    @Column(value = "account")
    @TableField(value = "account")
    private String account;

    /**
     * 用户密码
     */
    @Schema(description = "用户密码")
    @Column(value = "pwd")
    @TableField(value = "pwd")
    private String pwd;

    /**
     * 真实姓名
     */
    @Schema(description = "真实姓名")
    @Column(value = "real_name")
    @TableField(value = "real_name")
    private String realName;

    /**
     * 生日
     */
    @Schema(description = "生日")
    @Column(value = "birthday")
    @TableField(value = "birthday")
    private String birthday;

    /**
     * 身份证号码
     */
    @Schema(description = "身份证号码")
    @Column(value = "identity_card_no")
    @TableField(value = "identity_card_no")
    private String identityCardNo;

    /**
     * 标签id,英文逗号分隔
     */
    @Schema(description = "标签id,英文逗号分隔")
    @Column(value = "tag_id")
    @TableField(value = "tag_id")
    private String tagId;

    /**
     * 用户昵称
     */
    @Schema(description = "用户昵称")
    @Column(value = "nickname")
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 用户头像
     */
    @Schema(description = "用户头像")
    @Column(value = "avatar")
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 手机号码
     */
    @Schema(description = "手机号码")
    @Column(value = "phone")
    @TableField(value = "phone")
    private String phone;

    /**
     * 国家，中国CN，其他OTHER
     */
    @Schema(description = "国家，中国CN，其他OTHER")
    @Column(value = "country")
    @TableField(value = "country")
    private String country;

    /**
     * 省份
     */
    @Schema(description = "省份")
    @Column(value = "province")
    @TableField(value = "province")
    private String province;

    /**
     * 城市
     */
    @Schema(description = "城市")
    @Column(value = "city")
    @TableField(value = "city")
    private String city;

    /**
     * 区
     */
    @Schema(description = "区")
    @Column(value = "district")
    @TableField(value = "district")
    private String district;

    /**
     * 详细地址
     */
    @Schema(description = "详细地址")
    @Column(value = "address")
    @TableField(value = "address")
    private String address;

    /**
     * 性别，0未知，1男，2女，3保密
     */
    @Schema(description = "性别，0未知，1男，2女，3保密")
    @Column(value = "sex")
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 用户积分
     */
    @Schema(description = "用户积分")
    @Column(value = "integral")
    @TableField(value = "integral")
    private Integer integral;

    /**
     * 用户经验
     */
    @Schema(description = "用户经验")
    @Column(value = "experience")
    @TableField(value = "experience")
    private Integer experience;

    /**
     * 用户余额
     */
    @Schema(description = "用户余额")
    @Column(value = "now_money")
    @TableField(value = "now_money")
    private BigDecimal nowMoney;

    /**
     * 佣金金额
     */
    @Schema(description = "佣金金额")
    @Column(value = "brokerage_price")
    @TableField(value = "brokerage_price")
    private BigDecimal brokeragePrice;

    /**
     * 等级
     */
    @Schema(description = "等级")
    @Column(value = "level")
    @TableField(value = "level")
    private Integer level;

    /**
     * 连续签到天数
     */
    @Schema(description = "连续签到天数")
    @Column(value = "sign_num")
    @TableField(value = "sign_num")
    private Integer signNum;

    /**
     * 是否关联公众号
     */
    @Schema(description = "是否关联公众号")
    @Column(value = "is_wechat_public")
    @TableField(value = "is_wechat_public")
    private Integer isWechatPublic;

    /**
     * 是否关联小程序
     */
    @Schema(description = "是否关联小程序")
    @Column(value = "is_wechat_routine")
    @TableField(value = "is_wechat_routine")
    private Integer isWechatRoutine;

    /**
     * 用户购买次数
     */
    @Schema(description = "用户购买次数")
    @Column(value = "pay_count")
    @TableField(value = "pay_count")
    private Integer payCount;

    /**
     * 是否为推广员
     */
    @Schema(description = "是否为推广员")
    @Column(value = "is_promoter")
    @TableField(value = "is_promoter")
    private Integer isPromoter;

    /**
     * 成为分销员时间
     */
    @Schema(description = "成为分销员时间")
    @Column(value = "promoter_time")
    @TableField(value = "promoter_time")
    private LocalDateTime promoterTime;

    /**
     * 上级推广员id
     */
    @Schema(description = "上级推广员id")
    @Column(value = "spread_uid")
    @TableField(value = "spread_uid")
    private Integer spreadUid;

    /**
     * 绑定上级推广员时间
     */
    @Schema(description = "绑定上级推广员时间")
    @Column(value = "spread_time")
    @TableField(value = "spread_time")
    private LocalDateTime spreadTime;

    /**
     * 下级人数
     */
    @Schema(description = "下级人数")
    @Column(value = "spread_count")
    @TableField(value = "spread_count")
    private Integer spreadCount;

    /**
     * 注册类型：public-公众号，mini-小程序，H5-H5,iosWx-微信ios，androidWx-微信安卓，ios-ios
     */
    @Schema(description = "注册类型：public-公众号，mini-小程序，H5-H5,iosWx-微信ios，androidWx-微信安卓，ios-ios")
    @Column(value = "register_type")
    @TableField(value = "register_type")
    private String registerType;

    /**
     * 创建ip
     */
    @Schema(description = "创建ip")
    @Column(value = "add_ip")
    @TableField(value = "add_ip")
    private String addIp;

    /**
     * 最后一次登录ip
     */
    @Schema(description = "最后一次登录ip")
    @Column(value = "last_ip")
    @TableField(value = "last_ip")
    private String lastIp;

    /**
     * 最后一次登录时间
     */
    @Schema(description = "最后一次登录时间")
    @Column(value = "last_login_time")
    @TableField(value = "last_login_time")
    private LocalDateTime lastLoginTime;

    /**
     * 1为正常，0为禁止
     */
    @Schema(description = "1为正常，0为禁止")
    @Column(value = "status")
    @TableField(value = "status")
    private Integer status;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @Column(value = "mark")
    @TableField(value = "mark")
    private String mark;

    /**
     * 添加时间
     */
    @Schema(description = "添加时间")
    @Column(value = "create_time")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(value = "update_time")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 是否注销
     */
    @Schema(description = "是否注销")
    @Column(value = "is_logoff")
    @TableField(value = "is_logoff")
    private Integer isLogoff;

    /**
     * 注销时间
     */
    @Schema(description = "注销时间")
    @Column(value = "logoff_time")
    @TableField(value = "logoff_time")
    private LocalDateTime logoffTime;

    /**
     * 是否关联微信ios
     */
    @Schema(description = "是否关联微信ios")
    @Column(value = "is_wechat_ios")
    @TableField(value = "is_wechat_ios")
    private Integer isWechatIos;

    /**
     * 是否关联微信android
     */
    @Schema(description = "是否关联微信android")
    @Column(value = "is_wechat_android")
    @TableField(value = "is_wechat_android")
    private Integer isWechatAndroid;

    /**
     * 是否关联ios
     */
    @Schema(description = "是否关联ios")
    @Column(value = "is_binding_ios")
    @TableField(value = "is_binding_ios")
    private Integer isBindingIos;

    /**
     * 用户签名
     */
    @Schema(description = "用户签名")
    @Column(value = "signature")
    @TableField(value = "signature")
    private String signature;

    /**
     * 是否付费会员
     */
    @Schema(description = "是否付费会员")
    @Column(value = "is_paid_member")
    @TableField(value = "is_paid_member")
    private Integer isPaidMember;

    /**
     * 付费会员到期时间
     */
    @Schema(description = "付费会员到期时间")
    @Column(value = "paid_member_expiration_time")
    @TableField(value = "paid_member_expiration_time")
    private LocalDateTime paidMemberExpirationTime;

    /**
     * 是否永久付费会员
     */
    @Schema(description = "是否永久付费会员")
    @Column(value = "is_permanent_paid_member")
    @TableField(value = "is_permanent_paid_member")
    private Integer isPermanentPaidMember;

    /**
     * 身份证
     */
    @Schema(description = "身份证")
    @Column(value = "identity")
    @TableField(value = "identity")
    private String identity;

    /**
     * 身份证姓名
     */
    @Schema(description = "身份证姓名")
    @Column(value = "identity_name")
    @TableField(value = "identity_name")
    private String identityName;

    /**
     * 身份证有效期
     */
    @Schema(description = "身份证有效期")
    @Column(value = "identity_vld")
    @TableField(value = "identity_vld")
    private LocalDateTime identityVld;

    /**
     * 身份证有效期
     */
    @Schema(description = "身份证有效期")
    @Column(value = "identity_vld_end")
    @TableField(value = "identity_vld_end")
    private LocalDateTime identityVldEnd;

    /**
     * 身份证图片
     */
    @Schema(description = "身份证图片")
    @Column(value = "identity_url")
    @TableField(value = "identity_url")
    private String identityUrl;

    /**
     * 抵用券
     */
    @Schema(description = "抵用券")
    @Column(value = "voucher")
    @TableField(value = "voucher")
    private BigDecimal voucher;

    /**
     * 银行卡
     */
    @Schema(description = "银行卡")
    @Column(value = "ic_id", typeHandler = GsonTypeHandler.class)
    @TableField(value = "ic_id", typeHandler = FastjsonTypeHandler.class)
    private List<String> icId;

}
